package com.itheima.homework;

public class TestManager {
    public static void main(String[] args) {
        Manager m = new Manager();
        m.setId(123);
        m.setSalary(15000);
        m.setBonus(6000);
        m.work();
        Manager m2 = new Manager(123, 15000, 6000);
        m.work();
        Coder c = new Coder();
        c.setId(135);
        c.setSalary(10000);
        c.work();
        Coder c2 = new Coder(135, 10000);
        c.work();
    }


}

class Manager {
    private String name;
    private int id;
    private int salary;
    private int bonus;

    public Manager() {
    }

    public Manager(int id, int salary, int bonus) {
        this.id = id;
        this.salary = salary;
        this.bonus = bonus;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getId() {
        return id;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setSalary(int salary) {
        this.salary = salary;
    }

    public int getSalary() {
        return salary;
    }

    public void setBonus(int bonus) {
        this.bonus = bonus;
    }

    public int getBonus() {
        return bonus;
    }

    public void work() {
        System.out.println("工号为" + id + "基本工资为" + salary + "奖金为" + bonus + "的项目经理正在努力的做着管理工作,分配任务,检查员工提交上来的代码...");
    }

}


class Coder {
    private String name;
    private int id;
    private int salary;
    private int bonus;

    public Coder() {
    }

    public Coder(int id, int salary) {
        this.id = id;
        this.salary = salary;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getId() {
        return id;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setSalary(int salary) {
        this.salary = salary;
    }

    public int getSalary() {
        return salary;
    }

    public void setBonus(int bonus) {
        this.bonus = bonus;
    }

    public int getBonus() {
        return bonus;
    }

    public void work() {
        System.out.println("工号为" + id + "基本工资为" + salary + "的程序员正在努力的写着代码...");
    }

}
